import request from '@/utils/request'

// 查询任务完成明细列表
export function listDetail(query) {
  return request({
    url: '/system/detail/list',
    method: 'get',
    params: query
  })
}

// 查看报表
export function reportList(query) {
  return request({
    url: '/system/report/rebatesrepost',
    method: 'get',
    params: query
  })
}

// /system/report/exportrebatesrepost

// 任务详情
export function detailIdList(query){
  return request({
    url: `/system/task/dept/${query}`,
    method: 'get',
  })
}

// 查询任务完成明细详细
export function getDetail(taskDetailId) {
  return request({
    url: '/system/detail/' + taskDetailId,
    method: 'get'
  })
}

// 新增任务完成明细
export function addDetail(data) {
  return request({
    url: '/system/detail',
    method: 'post',
    data: data
  })
}
// 创建评价任务
export function createEvaluationTodo(data){
  return request({
    url: '/system/task/dept/createEvaluationTodo',
    method: 'post',
    data: data
  })
}

// // 创建追评任务
export function createAfterEvaluationTodo(data){
  return request({
    url: '/system/task/dept/createAfterEvaluationTodo',
    method: 'post',
    data: data
  })
}

// 修改任务完成明细
export function updateDetail(data) {
  return request({
    url: '/system/detail',
    method: 'put',
    data: data
  })
}

// 删除任务完成明细
export function delDetail(taskDetailId) {
  return request({
    url: '/system/detail/' + taskDetailId,
    method: 'delete'
  })
}

// 导出任务完成明细
export function exportDetail(query) {
  return request({
    url: '/system/detail/export',
    method: 'get',
    params: query
  })
}

// 导出全部
export function exportReport(query) {
  return request({
    url: '/system/RebatesTask/export',
    method: 'get',
    params: query
  })
}
// 返款任务列表
export function rebatestasklist(query) {
  return request({
    url: '/system/RebatesTask/list',
    method: 'get',
    params: query
  })
}
// 返款任务详情
export function rebatestaskdetail(query) {
  return request({
    url: `/system/RebatesTask/${query}`,
    method: 'get',
  })
}
// 更新任务详情
export function updataRebatestaskdetail(data) {
  return request({
    url: `/system/RebatesTask`,
    method: 'put',
    data: data
  })
}
// 确认返款
export function rebatesTask(data){
  return request({
    url: '/system/RebatesTask/beRebates/'+data,
    method: 'get'
  })
}

// 评价任务列表
export function evalutiontasklist(query) {
  return request({
    url: '/system/EvalutionTask/list',
    method: 'get',
    params: query
  })
}
// 修改任务评价状态

export function changeTaskStatu(data){
  return request({
    url: '/system/EvalutionTask/changeTaskStatus',
    method: 'post',
    data: data
  })
}
// 创建追评

export function yizhuiping (data){
  return request({
    url: '/system/EvalutionTask/createAfterEvaluationTodo',
    method: 'post',
    data: data
  })
}

// 导出全部
export function exportevalutionReport(query) {
  return request({
    url: '/system/EvalutionTask/export',
    method: 'get',
    params: query
  })
}